export function stringToList(str: string) {

    return str?.split(',')
        .map((id) => Number(id))
        .map(idString => Number(idString))
        .filter(idNumber => Number.isInteger(idNumber)) ?? []
}

export function	listToString(list: Array<number | undefined>) {
    return list.map(idNumber => String(idNumber)).join(',')
}